# ******************************************************************************************
# 文件名：Makefile
# 作者：狼狼    版本：V1.0    创建日期：2021.8.1
# ******************************************************************************************
VERSION = 1.0

CC = arm-hisiv300-linux-gcc

DEST = lprogram_Loice_Slave_Demo

OBJS =  main.o \
        ringbuffer.o \
        tcp_server.o \
        tcp_comm.o \
        loice_slave_parser.o \
        cmd_verify.o \
        cmd_process_handle.o \
        stream.o \
        L_GPIO_Peripherals.o

LIBS =  ./lib/libmpi.a \
        ./lib/libmd.a \
        ./lib/libVoiceEngine.a \
        ./lib/libupvqe.a \
        ./lib/libdnvqe.a \
        ./lib/libisp.a \
        ./lib/libsns_ov9732.a \
        ./lib/lib_cmoscfg.a \
        ./lib/lib_iniparser.a \
        ./lib/lib_hiae.a \
        ./lib/lib_hiawb.a \
        ./lib/lib_hiaf.a \
        ./lib/lib_hidefog.a

DEFINE += -DPROJECT_PRINTF_ENABLE 

CFLAGS  = -Wall -std=gnu99 -g -I./include -I./include_hi3518ev200 $(DEFINE) 
LDFLAGS = -lpthread -ldl -lm

all:lprogram

lprogram:$(OBJS)
	@$(CC) $(LDFLAGS) -o $(DEST) $(OBJS) $(LIBS) 

$(OBJS):%.o:%.c
	$(CC) $(CFLAGS) -c -o $@ $<

clean:
	rm -f *.o
	rm -f $(DEST)

clear:
	rm -f *.o
